﻿<%@ Page Title=" Quản lý câu hỏi" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="frmAdTaoCH.aspx.cs" Inherits="Admin_frmAdTaoCH" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="wrap">
        <h2>
            Quản lý câu hỏi
        </h2>
    </div>
    
    <table class="style1">
    <tr>
        <td>
            <asp:Label ID="Label1" runat="server" Text="Ma Cau Hoi"></asp:Label>
        </td>
        <td>
            <asp:TextBox ID="txtMaCH" runat="server" Enabled="False"></asp:TextBox>
        </td>
        <td>
            <asp:Button ID="btnThemCH" runat="server" onclick="btnThemCH_Click" CssClass="button"
                    Text="Them CH" Width="100px" />
        </td>
    </tr>
    <tr>
        <td class="style2">
            <asp:Label ID="Label2" runat="server" Text="Noi Dung"></asp:Label>
        </td>
        <td class="style2">
            <asp:TextBox ID="txtNoidungCH" runat="server" Enabled="False"></asp:TextBox>
        </td>
        <td class="style2">
            <asp:Button ID="btnXoaCH" runat="server" onclick="btnXoaCH_Click" Text="Xoa CH" CssClass="button"
                    Width="100px" />
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label3" runat="server" Text="Muc Do"></asp:Label>
        </td>
        <td>
            <asp:DropDownList ID="drplMucdo" runat="server" Enabled="False" Width="126px">
                <asp:ListItem>Kho</asp:ListItem>
                <asp:ListItem>TB</asp:ListItem>
                <asp:ListItem>De</asp:ListItem>
            </asp:DropDownList>
        </td>
        <td>
            <asp:Button ID="btnSua" runat="server" onclick="btnSua_Click" Text="Sua CH" CssClass="button"
                    Width="100px" />
        </td>
    </tr>
    <tr>
        <td class="style3">
            <asp:Label ID="Label4" runat="server" Text="A"></asp:Label>
        </td>
        <td class="style3">
            <asp:UpdatePanel ID="UpdatePanel6" runat="server">
                <ContentTemplate>
                    <asp:TextBox ID="txtA" runat="server" AutoPostBack="True" Enabled="False" 
                    ontextchanged="txtA_TextChanged"></asp:TextBox>
                </ContentTemplate>
            </asp:UpdatePanel>
        </td>
        <td class="style3">
            <asp:Button ID="btnHuy" runat="server" onclick="btnHuy_Click" CssClass="button"
                    Text="Huy Thao Tac" Width="100px" />
        </td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label5" runat="server" Text="B"></asp:Label>
        </td>
        <td>
                <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="txtB" runat="server" AutoPostBack="True" Enabled="False" 
                    ontextchanged="txtB_TextChanged"></asp:TextBox>

                    </ContentTemplate>
                </asp:UpdatePanel>

        <td>
                &nbsp;</td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label6" runat="server" Text="C"></asp:Label>
        </td>
        <td>
                <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="txtC" runat="server" AutoPostBack="True" Enabled="False" 
                    ontextchanged="txtC_TextChanged"></asp:TextBox>
                    </ContentTemplate>
                </asp:UpdatePanel>
        </td>
        <td>
                &nbsp;</td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label7" runat="server" Text="D"></asp:Label>
        </td>
        <td>
                <asp:UpdatePanel ID="UpdatePanel5" runat="server">
                    <ContentTemplate>
                        <asp:TextBox ID="txtD" runat="server" AutoPostBack="True" Enabled="False" 
                    ontextchanged="txtD_TextChanged"></asp:TextBox>
                    </ContentTemplate>
                </asp:UpdatePanel>
        </td>
        <td>
                &nbsp;</td>
    </tr>
    <tr>
        <td>
            <asp:Label ID="Label8" runat="server" Text="Dap An Dung"></asp:Label>
        </td>
        <td>
                <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                    <ContentTemplate>
                        <asp:DropDownList ID="drplDAdung" runat="server" Enabled="False" Width="126px">
                            <asp:ListItem></asp:ListItem>
                            <asp:ListItem></asp:ListItem>
                            <asp:ListItem></asp:ListItem>
                            <asp:ListItem></asp:ListItem>
                        </asp:DropDownList>
                    </ContentTemplate>
                </asp:UpdatePanel>
        </td>
        <td>
        </td>
    </tr>
</table>

    <div align="center" style="width:100%; border: solid 1px #CCCCCC;padding-top:7px; height:300px;  overflow:auto;">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                CellPadding="4" DataSourceID="SqlDataSource1" ForeColor="#333333" 
                GridLines="None" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" 
            AutoGenerateSelectButton="True" DataKeyNames="MaCH">
            <RowStyle BackColor="#EFF3FB" />
            <Columns>
                <asp:BoundField DataField="MaCH" HeaderText="MaCH" SortExpression="MaCH" 
                    ReadOnly="True" />
                <asp:BoundField DataField="NoiDungCH" HeaderText="NoiDungCH" 
                        SortExpression="NoiDungCH" />
                <asp:BoundField DataField="DA1" HeaderText="DA1" SortExpression="DA1" />
                <asp:BoundField DataField="DA2" HeaderText="DA2" SortExpression="DA2" />
                <asp:BoundField DataField="DA3" HeaderText="DA3" SortExpression="DA3" />
                <asp:BoundField DataField="DA4" HeaderText="DA4" SortExpression="DA4" />
                <asp:BoundField DataField="DADUNG" HeaderText="DADUNG" 
                        SortExpression="DADUNG" />
                <asp:BoundField DataField="Mucdo" HeaderText="Mucdo" SortExpression="Mucdo" />
            </Columns>
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <EditRowStyle BackColor="#2461BF" />
            <AlternatingRowStyle BackColor="White" />
        </asp:GridView>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        </asp:UpdatePanel>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:TracNghiemTrucTuyenConnectionString %>" 
                SelectCommand="SELECT * FROM [tbl_NGANHANGCAUHOI]"></asp:SqlDataSource>
    </div>
</asp:Content>

